package com.supermap.business.Version;

import com.alibaba.dubbo.config.annotation.Reference;
import com.supermap.business.user.FunctionController;
import com.supermap.dataservice.util.JSONUtils;
import com.supermap.dubbo.api.common.VersionService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by Administrator on 2019-04-25.
 */
@RestController
@RequestMapping("/version")
public class VersionController {
    /**
     * 使用指定类初始化日志对象，在日志输出的时候，可以打印出日志信息所在类
     */
    protected static final Logger logger = LoggerFactory.getLogger(FunctionController.class);


    @Reference(timeout =10000)
    private VersionService versionService;

    @GetMapping("getSystemVersion")
    public JSONUtils getSystemVersion(@RequestParam(value="systemtype")String systemtype) {
        return versionService.getSystemVersion(systemtype);
    }
}
